﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SmartVault.Core
{
    [Serializable()]
    public class SV_ObjectNotFound : SVException
    {
        private SV_ObjectNotFound(string message)
            : base(StaticErrorCode, message)
        {
        }

        internal static SVException Create(string message)
        {
            return new SV_ObjectNotFound(message);
        }

        internal static int StaticErrorCode { get { return ErrorCodes.ObjectNotFound; } }
    }

    [Serializable()]
    public class SV_AccessDenied : SVException
    {
        private SV_AccessDenied(string message)
            : base(StaticErrorCode, message)
        {
        }

        internal static SVException Create(string message)
        {
            return new SV_AccessDenied(message);
        }

        internal static int StaticErrorCode { get { return ErrorCodes.AccessDenied; } }
    }

    [Serializable()]
    public class SV_ObjectAlreadyExists : SVException
    {
        private SV_ObjectAlreadyExists(string message)
            : base(StaticErrorCode, message)
        {
        }

        internal static SVException Create(string message)
        {
            return new SV_ObjectAlreadyExists(message);
        }

        internal static int StaticErrorCode { get { return ErrorCodes.ObjectAlreadyExists; } }
    }

    [Serializable()]
    public class SV_SearchIndexNotAvailable : SVException
    {
        private SV_SearchIndexNotAvailable(string message)
            : base(StaticErrorCode, message)
        {
        }

        internal static SVException Create(string message)
        {
            return new SV_SearchIndexNotAvailable(message);
        }

        internal static int StaticErrorCode { get { return ErrorCodes.SearchIndexNotAvailable; } }
    }

    [Serializable()]
    public class SV_UserLimitExceeded : SVException
    {
        private SV_UserLimitExceeded(string message)
            : base(StaticErrorCode, message)
        {
        }

        internal static SVException Create(string message)
        {
            return new SV_UserLimitExceeded(message);
        }

        internal static int StaticErrorCode { get { return ErrorCodes.UserLimitExceeded; } }
    }

    [Serializable()]
    public class SV_GeneralFailure : SVException
    {
        private SV_GeneralFailure(string message)
            : base(StaticErrorCode, message)
        {
        }

        internal static SVException Create(string message)
        {
            return new SV_GeneralFailure(message);
        }

        internal static int StaticErrorCode { get { return ErrorCodes.GeneralFailure; } }
    }

    [Serializable()]
    public class SV_FileAlreadyExists : SVException
    {
        private SV_FileAlreadyExists(string message)
            : base(StaticErrorCode, message)
        {
        }

        internal static SVException Create(string message)
        {
            return new SV_FileAlreadyExists(message);
        }

        internal static int StaticErrorCode { get { return ErrorCodes.FileAlreadyExists; } }
    }

    [Serializable()]
    public class SV_FolderAlreadyExists : SVException
    {
        private SV_FolderAlreadyExists(string message)
            : base(StaticErrorCode, message)
        {
        }

        internal static SVException Create(string message)
        {
            return new SV_FolderAlreadyExists(message);
        }

        internal static int StaticErrorCode { get { return ErrorCodes.FolderAlreadyExists; } }
    }
}
